using System;
using System.Collections.Generic;
using System.Text;

namespace IGlobalist.Cms.Model
{
    [Serializable]
    public class AdContent : CmsObject, IAdContent
    {
        #region IAdContent Members

        public string Url
        {
            get
            {
                return (string) this.GetExtPropertyValue("Url");
            }
            set
            {
                this.SetExtPropertyValue("Url",value);
            }
        }

        public long PageID
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("PageID"));
            }
            set
            {
                SetExtPropertyValue("PageID", value);

            }
        }


        public string ToolTip
        {
            get
            {
                return (string)this.GetExtPropertyValue("ToolTip");
            }
            set
            {
                this.SetExtPropertyValue("ToolTip", value);
            }
        }

        public string Extention
        {
            get
            {
                return (string)this.GetExtPropertyValue("Extention");
            }
            set
            {
                this.SetExtPropertyValue("Extention", value);
            }
        }

        public AdType Type
        {
            get
            {
                return (AdType)Enum.Parse(typeof(AdType), (string)this.GetExtPropertyValue("Type"));
            }
            set
            {
                this.SetExtPropertyValue("Type", value);
            }
        }

        private PageList _PageList = new PageList();
        public PageList PageList
        {
            get
            {
                return _PageList;
            }
            set
            {
                _PageList = value;
            }
        }

        #endregion

        #region ICmsObject Members


        public bool FromCmsObject(CmsObject obj)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion

        #region IXml Members

        public bool FromXml(string xml)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public string ToXmlString()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion

       
    }
}
